<?php
Yii::import('system.web.widgets.CActiveForm');
class GridSearchForm extends CActiveForm{
	
	public $ajaxSubmit;
	
	public function submitButton($label='submit',$htmlOptions=array()){
		$buttonHtml = null;
		if (array_key_exists('class', $htmlOptions)) {
			$htmlOptions['class'] = 'grid-form-submit '.$htmlOptions['class'];
		}
		if ($this->ajaxSubmit === null) {
			$buttonHtml = CHtml::submitButton($label,$htmlOptions);
		}else{
			$buttonHtml = CHtml::htmlButton($label,$htmlOptions);
		}
		return $buttonHtml;
	}
}